package com.zjy.dao;

import com.zjy.bean.GoodsCategory;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface GoodsCategoryMapper extends Mapper<GoodsCategory> {

    /**
     * 判断type是否存在
     * @param type
     * @return
     */
    int checkExistType(int type);

    /**
     * 通过Id查找商品分类
     * @param categoryId
     * @return
     */
    GoodsCategory selectGoodsCategoryById(String categoryId);

    /**
     * 通过Id软删除商品分类
     * @param categoryId
     * @return
     */
    int deleteGoodsCategoryById(String categoryId);

    /**
     * 查找所有的商品分类
     * @return
     */
    List<GoodsCategory> selectAllGoodsCategory();


}